Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add equality to user attributes classes #1070

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

bkalil
Copy link
Contributor

@bkalil bkalil commented Oct 22, 2024

What kind of change does this PR introduce?

Fix both UserAttributes and AdminUserAttributes classes by adding equality.

What is the current behavior?

final attributeOne = UserAttributes(password: newPassword);
final attributeTwo = UserAttributes(password: newPassword);

attributeOne == attributeTwo // false

What is the new behavior?

final attributeOne = UserAttributes(password: newPassword);
final attributeTwo = UserAttributes(password: newPassword);

attributeOne == attributeTwo // true

Additional context

Encountered this behaviour when I tried to verify if my mock was called with the right values.

verify(() => mockAuthClient.updateUser(supa.UserAttributes(password: newPassword))); // failed

I then added the equality to the class in my pub cache and it worked.

* Both  and .
* Useful when verifying if a mock has been called with the correct parameter.
@bkalil bkalil requested a review from Vinzent03 October 23, 2024 09:56
@bkalil bkalil requested a review from Vinzent03 November 6, 2024 22:02
@Vinzent03 Vinzent03 merged commit 7e7bc0c into supabase:main Nov 6, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants